package com.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 */
public class Employrecord implements Serializable {
    /**
     * 合同编号
     */
    private String erid;

    /**
     * 营养师编号
     */
    private String did;

    /**
     * 会员编号
     */
    private String cid;

    /**
     * 合同开始时间
     */
    private Date begindate;

    /**
     * 合同结束时间
     */
    private Date enddate;

    /**
     * 合同价格
     */
    private Integer cost;

    /**
     * 合同详情（目标 解约条款）
     */
    private String evaluate;

    /**
     * 合同状态
     */
    private String erstate;

    /**
     * 合同异常情况描述
     */
    private String erreason;

    /**
     * 营养计划编号
     */
    private Integer prid;


    private Dietitian dietitian;

    private Plainrecord plainrecord;//营养计划


    public Dietitian getDietitian() {
        return dietitian;
    }

    public void setDietitian(Dietitian dietitian) {
        this.dietitian = dietitian;
    }

    private static final long serialVersionUID = 1L;

    public String getErid() {
        return erid;
    }

    public void setErid(String erid) {
        this.erid = erid;
    }

    public String getDid() {
        return did;
    }

    public void setDid(String did) {
        this.did = did;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public Date getBegindate() {
        return begindate;
    }

    public void setBegindate(Date begindate) {
        this.begindate = begindate;
    }

    public Date getEnddate() {
        return enddate;
    }

    public void setEnddate(Date enddate) {
        this.enddate = enddate;
    }

    public Integer getCost() {
        return cost;
    }

    public void setCost(Integer cost) {
        this.cost = cost;
    }

    public String getEvaluate() {
        return evaluate;
    }

    public void setEvaluate(String evaluate) {
        this.evaluate = evaluate;
    }

    public String getErstate() {
        return erstate;
    }

    public void setErstate(String erstate) {
        this.erstate = erstate;
    }

    public String getErreason() {
        return erreason;
    }

    public void setErreason(String erreason) {
        this.erreason = erreason;
    }

    public Integer getPrid() {
        return prid;
    }

    public void setPrid(Integer prid) {
        this.prid = prid;
    }

    public Plainrecord getPlainrecord() {
        return plainrecord;
    }

    public void setPlainrecord(Plainrecord plainrecord) {
        this.plainrecord = plainrecord;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Employrecord other = (Employrecord) that;
        return (this.getErid() == null ? other.getErid() == null : this.getErid().equals(other.getErid()))
            && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid()))
            && (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
            && (this.getBegindate() == null ? other.getBegindate() == null : this.getBegindate().equals(other.getBegindate()))
            && (this.getEnddate() == null ? other.getEnddate() == null : this.getEnddate().equals(other.getEnddate()))
            && (this.getCost() == null ? other.getCost() == null : this.getCost().equals(other.getCost()))
            && (this.getEvaluate() == null ? other.getEvaluate() == null : this.getEvaluate().equals(other.getEvaluate()))
            && (this.getErstate() == null ? other.getErstate() == null : this.getErstate().equals(other.getErstate()))
            && (this.getErreason() == null ? other.getErreason() == null : this.getErreason().equals(other.getErreason()))
            && (this.getPrid() == null ? other.getPrid() == null : this.getPrid().equals(other.getPrid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getErid() == null) ? 0 : getErid().hashCode());
        result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode());
        result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
        result = prime * result + ((getBegindate() == null) ? 0 : getBegindate().hashCode());
        result = prime * result + ((getEnddate() == null) ? 0 : getEnddate().hashCode());
        result = prime * result + ((getCost() == null) ? 0 : getCost().hashCode());
        result = prime * result + ((getEvaluate() == null) ? 0 : getEvaluate().hashCode());
        result = prime * result + ((getErstate() == null) ? 0 : getErstate().hashCode());
        result = prime * result + ((getErreason() == null) ? 0 : getErreason().hashCode());
        result = prime * result + ((getPrid() == null) ? 0 : getPrid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", erid=").append(erid);
        sb.append(", did=").append(did);
        sb.append(", cid=").append(cid);
        sb.append(", begindate=").append(begindate);
        sb.append(", enddate=").append(enddate);
        sb.append(", cost=").append(cost);
        sb.append(", evaluate=").append(evaluate);
        sb.append(", erstate=").append(erstate);
        sb.append(", erreason=").append(erreason);
        sb.append(", prid=").append(prid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}